import com.vhly.util.DeviceInfo;

import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
import java.io.IOException;
import java.util.Vector;

class cls_w
        implements inf_m {

    MainThread mainThread;
    cls_ae I;
    cls_ab J;
    int K;
    int L;
    private int a;
    int M;
    int N;
    int O;
    int P;
    Vector vector;
    Image img1;
    Image img102;
    Image img26;
    Image U;
    Image img97;
    cls_k aj;
    cls_k ak;
    int al;
    short am[][];
    boolean an;

    cls_w(MainThread thread) {
        am = new short[2][];
        mainThread = thread;
        I = thread.y;
        J = thread.L;
        vector = new Vector();
    }

    void a(int i, int l) {
    }

    void a(int ai1[]) {
    }

    void b() {
    }

    void c() {
    }

    void d() {
    }

    void a(Graphics g1) {
    }

    void c(Graphics g1) {
    }

    void b(Graphics g1) {
    }

    void d(Graphics g1) {
    }

    void g() {
    }

    void a(int i) {
    }

    boolean e() {
        return true;
    }

    void f() {
        mainThread.an--;
    }

    void h() {
    }

    void e(int i) {
    }

    void a_(int i) {
        if (I.a.e >= I.a.v.length)
            return;
        cls_h hi;
        switch (i) {
            case 3:
                if (I.a.a == 6) {
                    if (mainThread.aW) {
                        hi = new cls_h(mainThread, (short) 3, (short) 14, (short) 6, (short) 4, 2);
                        cls_h h8 = hi;
                        I.a(h8, false);
                    } else {
                        (hi = new cls_h(mainThread, (short) 3, (short) 16, (short) 6, (short) 4, 2)).a(mainThread.websiteURL);
                        cls_h h9 = hi;
                        I.a(h9, false);
                    }
                } else {
                    mainThread.fld_m_Vector.removeAllElements();
                    mainThread.k();
                    if (mainThread.R != 2) {
                        mainThread.k(2);
                        I.d();
                    } else {
                        mainThread.R = 4;
                        I.d();
                        I.b(0);
                        mainThread.R = 2;
                        g();
                    }
                }

            case 162:
                hi = new cls_h(mainThread, (short) 162, (short) 247, (short) 6, (short) 4, 2);
                String as[] = {
                        "*", "#"
                };
                hi.a(as);
                cls_h h10 = hi;
                I.a(h10, false);
                return;

            case 6:
                cls_h h3;
                (h3 = new cls_h(mainThread, (short) 6, (short) 16, (short) 6, (short) 4, 2)).a(mainThread.websiteURL);
                cls_h h17 = h3;
                I.a(h17, false);
                return;
            case 120:
                byte byte6 = 17;
                I.a(byte6, false);
                return;
            case 122:
                int j1 = 1;
                I.a(j1, false);
                return;
            case 123:
                mainThread.f();
                return;
            case 156:
                if (I.a.a == 11)
                    if (I.b[12] != null) {
                        byte byte0 = 12;
                        I.a(byte0, false);
                        I.a.fld_q_short = 6;
                        I.a.r = 4;
                        return;
                    } else {
                        hi = new cls_h(mainThread, (short) 243, (short) 274, (short) 6, (short) 4, 2);
                        cls_h h4 = hi;
                        I.a(h4, false);
                        return;
                    }
                if (I.a.a == 6) {
                    hi = new cls_h(mainThread, (short) 156, (short) 245, (short) 6, (short) 4, 2);
                    cls_h h5 = hi;
                    I.a(h5, false);
                    return;
                }
                if (mainThread.R == 0 || mainThread.R == 3) {
                    mainThread.S = 0;
                    I.b[3].a(mainThread.strs[156]);
                    byte byte1 = 3;
                    I.a(byte1, false);
                    return;
                }
                if (mainThread.co.size() >= 15) {
                    byte byte2 = 21;
                    I.a(byte2, false);
                    return;
                }
                if (mainThread.recordManager.q)
                    mainThread.k(3);
                else
                    mainThread.k(0);
                mainThread.y.d();
                mainThread.l(0);
                return;
            case 158:
                if (I.a.a == 11)
                    if (I.b[13] != null) {
                        byte byte3 = 13;
                        I.a(byte3, false);
                        I.a.fld_q_short = 6;
                        I.a.r = 4;
                        return;
                    } else {
                        hi = new cls_h(mainThread, (short) 243, (short) 274, (short) 6, (short) 4, 2);
                        cls_h h6 = hi;
                        I.a(h6, false);
                        return;
                    }
                if (I.a.a == 6) {
                    hi = new cls_h(mainThread, (short) 158, (short) 246, (short) 6, (short) 4, 2);
                    cls_h h7 = hi;
                    I.a(h7, false);
                    return;
                }
                if (mainThread.R == 1) {
                    mainThread.S = 1;
                    I.b[3].a(mainThread.strs[158]);
                    byte byte4 = 3;
                    I.a(byte4, false);
                    return;
                } else {
                    mainThread.k(1);
                    mainThread.l(1);
                    return;
                }
            case 160:
                if (Spore.e) {
                    cls_h h1 = new cls_h(mainThread, (short) 206, (short) 207, (short) 3, (short) 4, 2);
                    cls_h h14 = h1;
                    I.a(h14, false);
                    Spore.h = true;
                    try {
                        mainThread.sporeInstance.exitImage = Image.createImage("/exit.png");
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                    return;
                } else {
                    mainThread.h();
                    return;
                }
            case 164:
                byte byte5 = 6;

                I.a(byte5, false);
                return;

            case 165:
                hi = new cls_h(mainThread, (short) 165, (short) 166, (short) 6, (short) 4, 2);
                cls_h h12 = hi;

                I.a(h12, false);
                return;

            case 167:
                I.b[7].fld_q_short = 6;
                I.b[7].y[0] = mainThread.recordManager.a ? 1 : 0;
                I.b[7].y[1] = mainThread.recordManager.c ? 0 : 1;
                byte byte7 = 7;

                I.a(byte7, false);
                return;

            case 191:
                int i1 = 0;

                I.a(i1, false);
                return;

            case 197:
                byte byte8 = 2;

                I.a(byte8, false);
                return;

            case 206:
                hi = new cls_h(mainThread, (short) 206, (short) 291, (short) 3, (short) 4, 2);
                cls_h h13 = hi;

                I.a(h13, false);
                try {
                    mainThread.sporeInstance.exitImage = Image.createImage("/exit.png");
                } catch (IOException e) {
                    e.printStackTrace();
                }
                return;


            case 207:
            case 291:
                cls_e.requestURL(mainThread, Spore.spyURL, mainThread.sporeInstance);
                return;

            case 243:
                byte byte9 = 11;

                I.a(byte9, false);
                return;

            case 244:
                hi = new cls_h(mainThread, (short) 244, (short) 15, (short) 6, (short) 4, 2);
                cls_h h11 = hi;

                I.a(h11, false);
                return;

            case 260:
                new cls_ad();
                return;

            case 263:
                if (mainThread.mgImpl_wap) {
                    boolean flag = true;
                    try {
                        mainThread.sporeInstance.platformRequest(mainThread.cv[I.b[14].e][0]);
                    }
                    catch (Exception exception) {
                        flag = false;
                        if (exception.getMessage() != null)
                            mainThread.strs[275] = exception.getMessage();
                        cls_h h19 = new cls_h(mainThread, (short) 206, (short) 275, (short) 6, (short) 4, 2);
                        cls_h h15 = h19;
//                        i = I;
                        I.a(h15, false);
                    }
                    if (flag)
                        mainThread.h();
                    return;
                } else {
                    cls_h h2 = new cls_h(mainThread, (short) 206, (short) 207, (short) 6, (short) 4, 2);
                    cls_h h16 = h2;
//                    i = I;
                    I.a(h16, false);
                    return;
                }
//                break;

        }
//        i;
//        JVM INSTR lookupswitch 21: default 1597
//    //                   3: 730
//    //                   6: 1552
//    //                   120: 1023
//    //                   122: 1052
//    //                   123: 1066
//    //                   156: 204
//    //                   158: 504
//    //                   160: 1283
//    //                   162: 917
//    //                   164: 1008
//    //                   165: 1191
//    //                   167: 1074
//    //                   191: 1038
//    //                   197: 1170
//    //                   206: 1227
//    //                   207: 1359
//    //                   243: 1537
//    //                   244: 973
//    //                   260: 1184
//    //                   263: 1378
//    //                   291: 1359;
//           goto _L1 _L2 _L3 _L4 _L5 _L6 _L7 _L8 _L9 _L10 _L11 _L12 _L13 _L14 _L15 _L16 _L17 _L18 _L19 _L20 _L21 _L17
//_L7:
//        if(I.a.a == 11)
//            if(I.b[12] != null)
//            {
//                byte byte0 = 12;

//                I.a(byte0, false);
//                I.a.q = 6;
//                I.a.r = 4;
//                return;
//            } else
//            {
//                i = new h(mainThread, (short)243, (short)274, (short)6, (short)4, 2);
//                h h4 = i;

//                I.a(h4, false);
//                return;
//            }
//        if(I.a.a == 6)
//        {
//            i = new h(mainThread, (short)156, (short)245, (short)6, (short)4, 2);
//            h h5 = i;
//            i = I;
//            I.a(h5, false);
//            return;
//        }
//        if(mainThread.R == 0 || mainThread.R == 3)
//        {
//            mainThread.S = 0;
//            I.b[3].a(mainThread.strs[156]);
//            byte byte1 = 3;
//            i = I;
//            I.a(byte1, false);
//            return;
//        }
//        if(mainThread.co.size() >= 15)
//        {
//            byte byte2 = 21;
//            i = I;
//            I.a(byte2, false);
//            return;
//        }
//        if(mainThread.i.q)
//            mainThread.k(3);
//        else
//            mainThread.k(0);
//        mainThread.y.d();
//        mainThread.l(0);
//        return;
//_L8:
//        if(I.a.a == 11)
//            if(I.b[13] != null)
//            {
//                byte byte3 = 13;

//                I.a(byte3, false);
//                I.a.q = 6;
//                I.a.r = 4;
//                return;
//            } else
//            {
//                i = new h(mainThread, (short)243, (short)274, (short)6, (short)4, 2);
//                h h6 = i;

//                I.a(h6, false);
//                return;
//            }
//        if(I.a.a == 6)
//        {
//            i = new h(mainThread, (short)158, (short)246, (short)6, (short)4, 2);
//            h h7 = i;
//            i = I;
//            I.a(h7, false);
//            return;
//        }
//        if(mainThread.R == 1)
//        {
//            mainThread.S = 1;
//            I.b[3].a(mainThread.strs[158]);
//            byte byte4 = 3;
//            i = I;
//            I.a(byte4, false);
//            return;
//        } else
//        {
//            mainThread.k(1);
//            mainThread.l(1);
//            return;
//        }
//_L2:
//        if(I.a.a == 6)
//        {
//            if(mainThread.aW)
//            {
//                i = new h(mainThread, (short)3, (short)14, (short)6, (short)4, 2);
//                h h8 = i;

//                I.a(h8, false);
//            } else
//            {
//                (i = new h(mainThread, (short)3, (short)16, (short)6, (short)4, 2)).a(mainThread.l);
//                h h9 = i;

//                I.a(h9, false);
//            }
//        } else
//        {
//            mainThread.m.removeAllElements();
//            mainThread.k();
//            if(mainThread.R != 2)
//            {
//                mainThread.k(2);
//                I.d();
//            } else
//            {
//                mainThread.R = 4;
//                I.d();
//                I.b(0);
//                mainThread.R = 2;
//                g();
//            }
//        }
//_L10:
//        i = new h(mainThread, (short)162, (short)247, (short)6, (short)4, 2);
//        String as[] = {
//            "*", "#"
//        };
//        i.a(as);
//        h h10 = i;
//        i = I;
//        I.a(h10, false);
//        return;
//_L19:
//        i = new h(mainThread, (short)244, (short)15, (short)6, (short)4, 2);
//        h h11 = i;
//        i = I;
//        I.a(h11, false);
//        return;
//_L11:
//        byte byte5 = 6;
//        i = I;
//        I.a(byte5, false);
//        return;
//_L4:
//        byte byte6 = 17;
//        i = I;
//        I.a(byte6, false);
//        return;
//_L14:
//        int i1 = 0;
//        i = I;
//        I.a(i1, false);
//        return;
//_L5:
//        int j1 = 1;
//        i = I;
//        I.a(j1, false);
//        return;
//_L6:
//        mainThread.f();
//        return;
//_L13:
//        I.b[7].q = 6;
//        I.b[7].y[0] = mainThread.i.a ? 1 : 0;
//        I.b[7].y[1] = mainThread.i.c ? 0 : 1;
//        byte byte7 = 7;
//        i = I;
//        I.a(byte7, false);
//        return;
//_L15:
//        byte byte8 = 2;
//        i = I;
//        I.a(byte8, false);
//        return;
//_L20:
//        new cls_ad();
//        return;
//_L12:
//        i = new h(mainThread, (short)165, (short)166, (short)6, (short)4, 2);
//        h h12 = i;
//        i = I;
//        I.a(h12, false);
//        return;
//_L16:
//        i = new h(mainThread, (short)206, (short)291, (short)3, (short)4, 2);
//        h h13 = i;
//        i = I;
//        I.a(h13, false);
//        mainThread.f.i = Image.createImage("/exit.png");
//        return;
//        JVM INSTR dup ;
//        IOException ioexception;
//        ioexception;
//        printStackTrace();
//        return;
//_L9:
//        if(Spore.e){
//            //goto _L23; else goto _L22
////_L22:
//        h h1 = new h(mainThread, (short)206, (short)207, (short)3, (short)4, 2);
//        h h14 = h1;
////        i = I;
//        I.a(h14, false);
//        Spore.h = true;
//            try {
//                mainThread.f.i = Image.createImage("/exit.png");
//            } catch (IOException e) {
//                e.printStackTrace();
//            }
////          goto _L24
////        JVM INSTR dup ;
////        IOException ioexception1;
////        ioexception1;
////        printStackTrace();
//        return;
//        }else{
////_L23:
//        mainThread.h();
//        return;
//        }
//_L17:
//        e.a(mainThread, Spore.g, mainThread.f);
//        return;
//_L21:
//        if(mainThread.carrierCountryID)
//        {
//            boolean flag = true;
//            try
//            {
//                mainThread.f.platformRequest(mainThread.cv[I.b[14].e][0]);
//            }
//            catch(Exception exception)
//            {
//                flag = false;
//                if(exception.getMessage() != null)
//                    mainThread.strs[275] = exception.getMessage();
//                h h19 = new h(mainThread, (short)206, (short)275, (short)6, (short)4, 2);
//                h h15 = h19;

//                I.a(h15, false);
//            }
//            if(flag)
//                mainThread.h();
//            return;
//        } else
//        {
//            h h2 = new h(mainThread, (short)206, (short)207, (short)6, (short)4, 2);
//            h h16 = h2;
//            i = I;
//            I.a(h16, false);
//            return;
//        }
//_L18:
//        byte byte9 = 11;
//        i = I;
//        I.a(byte9, false);
//        return;
//_L3:
//        h h3;
//        (h3 = new h(mainThread, (short)6, (short)16, (short)6, (short)4, 2)).a(mainThread.l);
//        h h17 = h3;
//        i = I;
//        I.a(h17, false);
//        return;
//_L1:
//        for(int l = 0; l < mainThread.cw; l++)
//        {
//            if(i != 266 + l * 3)
//                continue;
//            if(mainThread.carrierCountryID)
//            {
//                boolean flag1 = true;
//                try
//                {
//                    mainThread.f.platformRequest(mainThread.cv[I.b[14].e][I.b[14].d]);
//                }
//                catch(Exception exception1)
//                {
//                    flag1 = false;
//                    if(exception1.getMessage() != null)
//                        mainThread.strs[275] += " " + exception1.getMessage() + mainThread.strs[207];
//                    h h20 = new h(mainThread, (short)206, (short)275, (short)6, (short)4, 2);
//                    I.a(h20);
//                }
//                if(flag1)
//                    mainThread.h();
//            } else
//            {
//                h h18 = new h(mainThread, (short)206, (short)207, (short)6, (short)4, 2);
//                I.a(h18);
//            }
//        }
//
//_L24:
    }

    void b(int ivalue, int l) {
        if (I.a.fld_b_int == 6 && I.a.c == 2 || I.a.fld_b_int == 9) {
            if (ivalue != 0) {
                I.a.c(ivalue);
                if ((ivalue & 0x40) != 0)
                    return;
            }
        } else if (ivalue != 0)
            I.a.b(ivalue);
        if ((ivalue & 0x20000) != 0 || (ivalue & 0x1020) != 0)
            switch (l) {
                case 14: // '\016'
                    if (I.a.fld_q_short == 3) {
                        if (I.a.d != 0)
                            l = 266 + 3 * I.a.e;
                        else
                            l = 263;
                        if (mainThread.cv[I.a.e][I.a.d] == null || !mainThread.mgImpl_wap && mainThread.mgImpl_static) {
                            l = 16;
//                        i = I;
                            I.a(l, false);
                            break;
                        }
                        if (mainThread.mgImpl_wap) {
                            I.b[15].c = l;
                            I.a(15, true);
                        }
                    }
                    return;

                case 12: // '\f'
                case 13:
                    if (I.a.fld_q_short == 5) {
                        mainThread.k(4);
                        return;
                    }
                    break;

                case 3:
                    if (mainThread.S == 0) {
                        mainThread.recordManager.q = false;
                        mainThread.recordManager.d = 0;
                        if (mainThread.R == 0)
                            ((cls_j) this).c = null;
                        mainThread.recordManager.u = 5;
                        mainThread.recordManager.a(0);
                        mainThread.q(0);
                    } else if (mainThread.S == 1) {
                        mainThread.recordManager.e = 0;
                        mainThread.recordManager.f = 0;
                        mainThread.recordManager.g = 0;
                        mainThread.recordManager.a(1);
                    }
                    mainThread.recordManager.savePrefs();
                    mainThread.k(mainThread.S);
                    mainThread.l(mainThread.S);
                    return;

                case 2:
                    (mainThread).recordManager.a(2);
                    (mainThread).recordManager.resetPrefs();
                    (mainThread).recordManager.savePrefs();
                    mainThread.q(2);
                    mainThread.k(4);
                    return;

                case 19: // '\023'
                    mainThread.recordManager.a = true;
                    mainThread.gameState = 2;
                    mainThread.i(142);
                    return;

                case 15:
                    a_(I.a.c);
                    return;

                case 17: // '\021'
                    a_(I.a.v[I.a.e]);
                    mainThread.recordManager.savePrefs();
                    if (I.a.r == 6) {
                        I.b();
                        I.a.r = 4;
                        I.b(19);
                        return;
                    }
                    break;

                case 4:
                case 5:
                case 6:
                case 7:
                case 8:
                case 9:
                case 10:
                case 11: // '\013'
                case 16:
                case 18: // '\022'
                default:
                    a_(I.a.v[I.a.e]);
                    return;
            }
        else if ((ivalue & 0x40000) != 0 || (ivalue & 0x40) != 0)
            switch (l) {
                case 5:
                    System.out.println("game.mode = " + mainThread.R);
                    if (mainThread.R == 4) {
                        if ((ivalue & 0x40) != 0) {
                            I.a(1);
                            return;
                        } else {
                            I.e();
                            return;
                        }
                    } else {
                        mainThread.f();
                        return;
                    }

                case 19: // '\023'
                    mainThread.gameState = 2;
                    mainThread.i(142);
                    return;

                case 0:
                    if (((ivalue & 0x40) != 0 || (ivalue & 0x40000) != 0) && mainThread.R == 4) {
                        I.a(5);
                        return;
                    } else {
                        I.e();
                        return;
                    }

                case 12: // '\f'
                case 13:
                    if (I.a.r == 4) {
                        I.e();
                        return;
                    }
                    break;

                default:
                    if (I.a.r == 6)
                        break;
                    if (Spore.h) {
                        mainThread.h();
                        return;
                    }
                    I.e();
                    mainThread.sporeInstance.exitImage = null;
                    break;
            }
    }

    void b_(int i) {
        switch (i) {
            case 7:
            case 11: // '\013'
            default:
                break;

            case 6:
                mainThread.bQ = System.currentTimeMillis();
                I.a.b();
                /*(i = mainThread)*/
                mainThread.bi = null;
                mainThread.cu = false;
                mainThread.cs.a(0, 0, 0L, MainThread.bP);
                return;

            case 14: // '\016'
                mainThread.img78 = null;
                return;

            case 12: // '\f'
                J.b(24);
                return;

            case 13:
                return;

            case 9:
                if (mainThread.gameState != 6) {
                    mainThread.ck.B = mainThread.cC[0][3];
                    mainThread.ck.d = 2;
                    mainThread.ck.c = null;
                    mainThread.fld_m_Vector.addElement(mainThread.ck);
                    mainThread.l();
                    return;
                }
                break;

            case 8:
                if ((mainThread.am & 0x40) == 0 && (mainThread.ck.H & 0x40) != 0) {
                    char c1 = '\u014C';
                    mainThread.ck.e = c1 * (mainThread.ck.U[0]) >> 8;
                }
                mainThread.n.removeAllElements();
                mainThread.bQ = System.currentTimeMillis();
                if (mainThread.N != 8) {
                    mainThread.recordManager.i = mainThread.b(mainThread.ck);
                    mainThread.recordManager.savePrefs();
                    return;
                }
                break;

            case 10:
                mainThread.A = false;
                mainThread.cs.a(0, 0, 0L, MainThread.bP);
                return;

            case 4:
                mainThread.sporeEALogo = null;
                return;

            case 2:
            case 3:
            case 5:
                mainThread.consumerLogo = null;
                break;
        }
    }

    void d(int i) {
        mainThread.cI = false;
        switch (i) {
            case 0:
                J.d();
                break;
            case 1:
                break;
            case 2:
                try {
                    mainThread.consumerLogo = Image.createImage("/logo_0.png");
                } catch (IOException e) {
                    e.printStackTrace();
                }
                return;
            case 3:
                try {
                    mainThread.consumerLogo = Image.createImage("/logo_1.png");
                } catch (IOException e) {
                    e.printStackTrace();
                }
                return;
            case 4:
                mainThread.sporeEALogo = MainThread.loadUnencodeImage(4);
                I.b[19] = null;
                return;
            case 5:
                J.a(27, true);
                mainThread.consumerLogo = MainThread.loadUnencodeImage(13);
                return;
            case 6:
                if (I.a.a == 5) {
                    mainThread.A = false;
                    return;
                }
                break;
            case 7:
                if (mainThread.gameState == 7) {
                    I.a = new cls_h(mainThread, (short) 6, (short) 1);
                    return;
                }
                break;
            case 8:
                break;
            case 9:
                if (mainThread.B) {
                    mainThread.T = mainThread.R != 0 ? mainThread.recordManager.e : mainThread.recordManager.d;
                    mainThread.B = false;
                }
                a = 0;
                mainThread.U = (mainThread.T / 3) % 6;
                J.d();
                return;
            case 10:
                mainThread.A = true;
                mainThread.cs.a(100, 0, 0L, MainThread.bP);
                if (mainThread.R != 1)
                    i = mainThread.an != 0 ? 4 : 2;
                else
                    i = 6;
                I.a = new cls_h(mainThread, (short) 5, (short) i);
                for (i = 0; i < mainThread.fld_m_Vector.size(); i++) {
                    cls_d d1 = (cls_d) mainThread.fld_m_Vector.elementAt(i);
                    d1.v = true;
                }

//                _L8:
                if (mainThread.gameState == 7) {
                    I.a = new cls_h(mainThread, (short) 6, (short) 1);
                    return;
                }
                break;
            case 11:
                break;
            case 12:
                J.d();
                byte byte1 = 24;
//                i = J;   // TODO ?
                J.a(byte1, false);
                vector.removeAllElements();
                mainThread.n.removeAllElements();
                mainThread.ca = MainThread.bP + 5600L;
                mainThread.cj = new cls_aa(-DeviceInfo.DEVICE_SCREEN_WIDTH, 104);
                mainThread.cj.b(0, 104, 6);
                mainThread.ct.a = 256 << 8;
                mainThread.ct.a(0, 0, 1400L, mainThread.ca - 1400L);
                return;
            case 13:
                J.d();
                byte byte0 = 23;
//                i = J;
                J.a(byte0, false);
                mainThread.cs.a(256, 0, 3000L, MainThread.bP);
                return;
            case 14:
                mainThread.an = 0;
                mainThread.fld_m_Vector.removeAllElements();
                mainThread.a(mainThread.ck, 0, 0);
                mainThread.img78 = MainThread.loadUnencodeImage(78);
                mainThread.o();
                J.a(26, true);
                return;
        }
//        i;
//        JVM INSTR tableswitch 0 14: default 679
//    //                   0 672
//    //                   1 679
//    //                   2 634
//    //                   3 653
//    //                   4 588
//    //                   5 611
//    //                   6 565
//    //                   7 531
//    //                   8 679
//    //                   9 190
//    //                   10 411
//    //                   11 679
//    //                   12 280
//    //                   13 148
//    //                   14 84;
//           goto _L1 _L2 _L1 _L3 _L4 _L5 _L6 _L7 _L8 _L1 _L9 _L10 _L1 _L11 _L12 _L13
//_L1:
//        break; /* Loop/switch isn't completed */
//_L13:
//        mainThread.an = 0;
//        mainThread.m.removeAllElements();
//        mainThread.a(mainThread.ck, 0, 0);
//        mainThread.img78 = MainThread.h(78);
//        mainThread.o();
//        J.a(26, true);
//        return;
//_L12:
//        J.d();
//        byte byte0 = 23;
//        i = J;
//        J.a(byte0, false);
//        mainThread.cs.a(256, 0, 3000L, MainThread.bP);
//        return;
//_L9:
//        if(mainThread.B)
//        {
//            mainThread.T = mainThread.R != 0 ? mainThread.i.e : mainThread.i.d;
//            mainThread.B = false;
//        }
//        a = 0;
//        mainThread.U = (mainThread.T / 3) % 6;
//        J.d();
//        return;
//_L11:
//        J.d();
//        byte byte1 = 24;
//        i = J;
//        J.a(byte1, false);
//        vector.removeAllElements();
//        mainThread.n.removeAllElements();
//        mainThread.ca = MainThread.bP + 5600L;
//        mainThread.cj = new cls_aa(-DeviceInfo.DEVICE_SCREEN_WIDTH, 104);
//        mainThread.cj.b(0, 104, 6);
//        mainThread.ct.a = (i = 256) << 8;
//        mainThread.ct.a(0, 0, 1400L, mainThread.ca - 1400L);
//        return;
//_L10:
//        mainThread.A = true;
//        mainThread.cs.a(100, 0, 0L, MainThread.bP);
//        if(mainThread.R != 1)
//            i = mainThread.an != 0 ? 4 : 2;
//        else
//            i = 6;
//        I.a = new h(mainThread, (short)5, i);
//        for(i = 0; i < mainThread.m.size(); i++)
//        {
//            d d1;
//            (d1 = (d)mainThread.m.elementAt(i)).v = true;
//        }
//
//_L8:
//        if(mainThread.gameState == 7)
//        {
//            I.a = new h(mainThread, (short)6, (short)1);
//            return;
//        }
//        break; /* Loop/switch isn't completed */
//_L7:
//        if(I.a.a == 5)
//        {
//            mainThread.A = false;
//            return;
//        }
//        break; /* Loop/switch isn't completed */
//_L5:
//        mainThread.sporeEALogo = MainThread.h(4);
//        I.b[19] = null;
//        return;
//_L6:
//        J.a(27, true);
//        mainThread.consumerLogo = MainThread.h(13);
//        return;
//_L3:
//        mainThread.consumerLogo = Image.createImage("/logo_0.png");
//        return;
//        JVM INSTR dup ;
//        i;
//        printStackTrace();
//        return;
//_L4:
//        mainThread.consumerLogo = Image.createImage("/logo_1.png");
//        return;
//        JVM INSTR dup ;
//        i;
//        printStackTrace();
//        return;
//_L2:
//        J.d();
    }

    void a() {
        mainThread.i();
        mainThread.a(mainThread.ck, 0, 0);
        mainThread.T = mainThread.j(18);
        mainThread.c();
        mainThread.fld_m_Vector.removeAllElements();
        mainThread.k();
        mainThread.ci.a = mainThread.cn.o.a - ((88) << 8);
        mainThread.ci.b = mainThread.cn.o.b - ((104) << 8);
        mainThread.A = false;
        mainThread.cs.a = 0;
    }

    final void b(int ai1[]) {
        ak = new cls_k(103, 4);
        ak.e = 100;
        ak.a = mainThread.T % 3;
        ak.f = 0L;
        img102 = MainThread.loadUnencodeImage(102);
        img26 = MainThread.loadUnencodeImage(26);
        img1 = MainThread.a(1, ai1);
        U = MainThread.a(96, ai1);
        img97 = MainThread.loadUnencodeImage(97);
        aj = new cls_k(101, 3, ai1);
        P = (U.getWidth() - 1) * 5 + 1;
        M = DeviceInfo.DEVICE_SCREEN_WIDTH - (P + img1.getWidth() + img102.getWidth() + 4);
        N = img1.getWidth();
        O = N + M;
    }

    final void a(Graphics g1, int i) {
        i = (M * i) / 100;
        a++;
        if (a > i)
            a = i;
        g1.setClip(N, 0, M, DeviceInfo.DEVICE_SCREEN_HEIGHT);
        for (i = N; i < O; i += aj.c) {
            aj.a(g1, i, 2, 2, 20);
            aj.a(g1, i, 2, 1, 20);
        }

        g1.setClip(N, 0, a, DeviceInfo.DEVICE_SCREEN_HEIGHT);
        for (i = N; i < O; i += aj.c)
            aj.a(g1, i, 2, 0, 20);

        g1.setClip(0, 0, DeviceInfo.DEVICE_SCREEN_WIDTH, DeviceInfo.DEVICE_SCREEN_HEIGHT);
        g1.drawImage(img102, O, 2, 20);
        g1.setClip(0, 0, DeviceInfo.DEVICE_SCREEN_WIDTH, DeviceInfo.DEVICE_SCREEN_HEIGHT);
        for (i = 0; i < 5; i++)
            g1.drawImage(img97, DeviceInfo.DEVICE_SCREEN_WIDTH - (U.getWidth() - 1) * i - 3, img102.getHeight() >> 1, 10);

    }
}